package com.xzx.framework.util.http;


import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolException;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.protocol.HttpContext;


/**
 * 重定向策略(不重定向)
 * @author wei
 * @time 2015年11月1日 下午9:59:36
 */
public class RedirectStrategy implements org.apache.http.client.RedirectStrategy {
	private static RedirectStrategy instance = null;


	private RedirectStrategy(){}
	
	public static RedirectStrategy getInstance(){
		if(instance == null) {
			synchronized (RedirectStrategy.class) {
				if(instance == null) {
					instance = new RedirectStrategy();
				}
			}
		}
		
		return instance;
	}

	public boolean isRedirected(HttpRequest request, HttpResponse response, HttpContext context) throws ProtocolException {
		return false;
	}

	public HttpUriRequest getRedirect(HttpRequest request, HttpResponse response, HttpContext context) throws ProtocolException {
		return null;
	}
}
